<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$CONFIG_PARAMS_GENERAL[0]->name = CONFIG_REVIEW_FORM_POSITION;
$CONFIG_PARAMS_GENERAL[0]->text = "REVIEW_FORM_POSITION";
$CONFIG_PARAMS_GENERAL[0]->desc = "REVIEW_FORM_POSITION_DESC";
$CONFIG_PARAMS_GENERAL[0]->info = "REVIEW_FORM_POSITION_INFO";
$CONFIG_PARAMS_GENERAL[1]->name = CONFIG_REVIEW_STATUS;
$CONFIG_PARAMS_GENERAL[1]->text = "DEFAULT_REVIEW_STATUS";
$CONFIG_PARAMS_GENERAL[1]->desc = "DEFAULT_REVIEW_STATUS_DESC";
$CONFIG_PARAMS_GENERAL[1]->info = "DEFAULT_REVIEW_STATUS_INFO";
$CONFIG_PARAMS_GENERAL[2]->name = CONFIG_REFERRAL_SYSTEM;
$CONFIG_PARAMS_GENERAL[2]->text = "REFERRAL_SYSTEM";
$CONFIG_PARAMS_GENERAL[2]->desc = "REFERRAL_SYSTEM_DESC";
$CONFIG_PARAMS_GENERAL[2]->info = "REFERRAL_SYSTEM_INFO";
$CONFIG_PARAMS_GENERAL[3]->name = CONFIG_POINTS_SYSTEM;
$CONFIG_PARAMS_GENERAL[3]->text = "POINTS_SYSTEM";
$CONFIG_PARAMS_GENERAL[3]->desc = "POINTS_SYSTEM_DESC";
$CONFIG_PARAMS_GENERAL[3]->info = "POINTS_SYSTEM_INFO";
$CONFIG_PARAMS_GENERAL[4]->name = CONFIG_JS_POINTS_RATINGS;
$CONFIG_PARAMS_GENERAL[4]->text = "JOMSOCIAL_RATINGS_NUM";
$CONFIG_PARAMS_GENERAL[4]->desc = "JOMSOCIAL_RATINGS_NUM_DESC";
$CONFIG_PARAMS_GENERAL[4]->info = "JOMSOCIAL_RATINGS_NUM_INFO";

$CONFIG_PARAMS_PAY[0]->name = CONFIG_MIN_PAYMENT_THRESHOLD;
$CONFIG_PARAMS_PAY[0]->text = "PAYMENT_MIN_LIMIT";
$CONFIG_PARAMS_PAY[0]->desc = "PAYMENT_MIN_LIMIT_DESC";
$CONFIG_PARAMS_PAY[0]->info = "PAYMENT_MIN_LIMIT_INFO";
$CONFIG_PARAMS_PAY[1]->name = CONFIG_WEBLINK_CASH_CREDIT;
$CONFIG_PARAMS_PAY[1]->text = "WEBLINK_DEFAULT_CREDIT";
$CONFIG_PARAMS_PAY[1]->desc = "WEBLINK_DEFAULT_CREDIT_DESC";
$CONFIG_PARAMS_PAY[1]->info = "WEBLINK_DEFAULT_CREDIT_INFO";
//$CONFIG_PARAMS_PAY[2]->name = CONFIG_PAYMENT_CUTOFF_DAY;
//$CONFIG_PARAMS_PAY[2]->text = "PAYMENT_CUTOFF_DAY";
//$CONFIG_PARAMS_PAY[2]->desc = "PAYMENT_CUTOFF_DAY_DESC";
//$CONFIG_PARAMS_PAY[2]->info = "PAYMENT_CUTOFF_DAY_INFO";
$CONFIG_PARAMS_PAY[2]->name = CONFIG_DEFAULT_PAY_METHOD;
$CONFIG_PARAMS_PAY[2]->text = "DEFAULT_PAY_METHOD";
$CONFIG_PARAMS_PAY[2]->desc = "DEFAULT_PAY_METHOD_DESC";
$CONFIG_PARAMS_PAY[2]->info = "DEFAULT_PAY_METHOD_INFO";

$CONFIG_PARAMS_FEATURES[0]->name = CONFIG_ENABLE_POINTS;
$CONFIG_PARAMS_FEATURES[0]->text = "ENABLE_POINTS";
$CONFIG_PARAMS_FEATURES[0]->desc = "ENABLE_POINTS_DESC";
$CONFIG_PARAMS_FEATURES[0]->info = "ENABLE_POINTS_INFO";
$CONFIG_PARAMS_FEATURES[1]->name = CONFIG_ENABLE_WEBLINKS;
$CONFIG_PARAMS_FEATURES[1]->text = "ENABLE_WEBLINKS";
$CONFIG_PARAMS_FEATURES[1]->desc = "ENABLE_WEBLINKS_DESC";
$CONFIG_PARAMS_FEATURES[1]->info = "ENABLE_WEBLINKS_INFO";
$CONFIG_PARAMS_FEATURES[2]->name = CONFIG_ENABLE_REFERRALS;
$CONFIG_PARAMS_FEATURES[2]->text = "ENABLE_REFERRALS";
$CONFIG_PARAMS_FEATURES[2]->desc = "ENABLE_REFERRALS_DESC";
$CONFIG_PARAMS_FEATURES[2]->info = "ENABLE_REFERRALS_INFO";
$CONFIG_PARAMS_FEATURES[3]->name = CONFIG_ENABLE_AWARDS;
$CONFIG_PARAMS_FEATURES[3]->text = "ENABLE_AWARDS";
$CONFIG_PARAMS_FEATURES[3]->desc = "ENABLE_AWARDS_DESC";
$CONFIG_PARAMS_FEATURES[3]->info = "ENABLE_AWARDS_INFO";

$CONFIG_PARAMS_EMAIL[0]->name = CONFIG_SENDER_EMAIL;
$CONFIG_PARAMS_EMAIL[0]->text = "EMAIL_SENDER";
$CONFIG_PARAMS_EMAIL[0]->desc = "EMAIL_SENDER_DESC";
$CONFIG_PARAMS_EMAIL[0]->info = "EMAIL_SENDER_INFO";
$CONFIG_PARAMS_EMAIL[1]->name = CONFIG_SENDER_NAME;
$CONFIG_PARAMS_EMAIL[1]->text = "EMAIL_SENDER_NAME";
$CONFIG_PARAMS_EMAIL[1]->desc = "EMAIL_SENDER_NAME_DESC";
$CONFIG_PARAMS_EMAIL[1]->info = "EMAIL_SENDER_NAME_INFO";
$CONFIG_PARAMS_EMAIL[2]->name = CONFIG_A_ARTICLE_EMAIL_SUB;
$CONFIG_PARAMS_EMAIL[2]->text = "EMAIL_APPROVED_SUB";
$CONFIG_PARAMS_EMAIL[2]->desc = "EMAIL_APPROVED_SUB_DESC";
$CONFIG_PARAMS_EMAIL[2]->info = "EMAIL_APPROVED_SUB_INFO";
$CONFIG_PARAMS_EMAIL[3]->name = CONFIG_R_ARTICLE_EMAIL_SUB;
$CONFIG_PARAMS_EMAIL[3]->text = "EMAIL_REJECTED_SUB";
$CONFIG_PARAMS_EMAIL[3]->desc = "EMAIL_REJECTED_SUB_DESC";
$CONFIG_PARAMS_EMAIL[3]->info = "EMAIL_REJECTED_SUB_INFO";
$CONFIG_PARAMS_EMAIL[4]->name = CONFIG_A_ARTICLE_EMAIL_BODY;
$CONFIG_PARAMS_EMAIL[4]->text = "EMAIL_APPROVED_BODY";
$CONFIG_PARAMS_EMAIL[4]->desc = "EMAIL_APPROVED_BODY_DESC";
$CONFIG_PARAMS_EMAIL[4]->info = "EMAIL_APPROVED_BODY_INFO";
$CONFIG_PARAMS_EMAIL[5]->name = CONFIG_R_ARTICLE_EMAIL_BODY;
$CONFIG_PARAMS_EMAIL[5]->text = "EMAIL_REJECTED_BODY";
$CONFIG_PARAMS_EMAIL[5]->desc = "EMAIL_REJECTED_BODY_DESC";
$CONFIG_PARAMS_EMAIL[5]->info = "EMAIL_REJECTED_BODY_INFO";
?>
<form action="index.php?option=com_articlecashrewards" method="post" name="adminForm">
<div id="config-document">
<table class="noshow">
    <tbody>
        <tr>
            <td valign="top" width="75%">
                <?php
                jimport('joomla.html.pane');
                $pane =& JPane::getInstance('tabs', array('startOffset'=>0));
                echo $pane->startPane( 'pane' );
                    echo $pane->startPanel( JText::_('TAB_GENERAL'), 'tabGeneral' );
                    ?>
                    <table class="admintable">
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_GENERAL[0]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_GENERAL[0]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[0]->text); ?>
                                </span>
                            </td>
                            <td>
                                <select
                                    class="inputbox"
                                    name="<?php echo $CONFIG_PARAMS_GENERAL[0]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_GENERAL[0]->name ?>"
                                    size="1"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_GENERAL[0]->name]; ?>">
                                        <option value="<?php echo REVIEW_FORM_POSITION_BOTTOM; ?>" <?php if(strcasecmp(REVIEW_FORM_POSITION_BOTTOM, $this->acr_config[$CONFIG_PARAMS_GENERAL[0]->name])==0) echo "selected";?>>Bottom
                                        <option value="<?php echo REVIEW_FORM_POSITION_TOP; ?>" <?php if(strcasecmp(REVIEW_FORM_POSITION_TOP, $this->acr_config[$CONFIG_PARAMS_GENERAL[0]->name])==0) echo "selected";?>>Top
                                </select>
                            </td>
                            <td style="background-color: #f6f6f6">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[0]->info); ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_GENERAL[1]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_GENERAL[1]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[1]->text); ?>
                                </span>
                            </td>
                            <td>
                                <select
                                    class="inputbox"
                                    name="<?php echo $CONFIG_PARAMS_GENERAL[1]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_GENERAL[1]->name ?>"
                                    size="1"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_GENERAL[1]->name]; ?>">
                                        <option value="<?php echo STATUS_APPROVED; ?>" <?php if(strcasecmp(STATUS_APPROVED, $this->acr_config[$CONFIG_PARAMS_GENERAL[1]->name])==0) echo "selected";?>><?php echo JText::_('LABEL_APPROVED'); ?>
                                        <option value="<?php echo STATUS_REJECTED; ?>" <?php if(strcasecmp(STATUS_REJECTED, $this->acr_config[$CONFIG_PARAMS_GENERAL[1]->name])==0) echo "selected";?>><?php echo JText::_('LABEL_REJECTED'); ?>
                                </select>
                            </td>
                            <td style="background-color: #f6f6f6">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[1]->info); ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_GENERAL[2]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_GENERAL[2]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[2]->text); ?>
                                </span>
                            </td>
                            <td>
                                <select
                                    class="inputbox"
                                    name="<?php echo $CONFIG_PARAMS_GENERAL[2]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_GENERAL[2]->name ?>"
                                    size="1"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_GENERAL[2]->name]; ?>">
                                        <option value="<?php echo REFERRAL_SYSTEM_AUP; ?>"><?php echo REFERRAL_SYSTEM_AUP_NAME; ?>
                                </select>
                            </td>
                            <td style="background-color: #f6f6f6">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[2]->info); ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_GENERAL[3]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_GENERAL[3]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[3]->text); ?>
                                </span>
                            </td>
                            <td>
                                <select
                                    class="inputbox"
                                    name="<?php echo $CONFIG_PARAMS_GENERAL[3]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_GENERAL[3]->name ?>"
                                    size="1"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_GENERAL[3]->name]; ?>">
                                    <option value="<?php echo POINTS_SYSTEM_ACR; ?>" <?php if(strcasecmp(POINTS_SYSTEM_ACR, $this->acr_config[$CONFIG_PARAMS_GENERAL[3]->name])==0) echo "selected";?>><?php echo POINTS_SYSTEM_ACR_NAME; ?></option>
                                    <option value="<?php echo POINTS_SYSTEM_AUP; ?>" <?php if(strcasecmp(POINTS_SYSTEM_AUP, $this->acr_config[$CONFIG_PARAMS_GENERAL[3]->name])==0) echo "selected";?>><?php echo POINTS_SYSTEM_AUP_NAME; ?></option>
                                    <option value="<?php echo POINTS_SYSTEM_JOMSOCIAL; ?>" <?php if(strcasecmp(POINTS_SYSTEM_JOMSOCIAL, $this->acr_config[$CONFIG_PARAMS_GENERAL[3]->name])==0) echo "selected";?>><?php echo POINTS_SYSTEM_JOMSOCIAL_NAME; ?></option>
                                </select>
                            </td>
                            <td style="background-color: #f6f6f6">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[3]->info); ?>
                            </td>
                        </tr>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_GENERAL[4]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_GENERAL[4]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_GENERAL[4]->text); ?>
                                </span>
                            </td>
                            <td>
                                <input
                                    class="inputbox"
                                    type="text"
                                    name="<?php echo $CONFIG_PARAMS_GENERAL[4]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_GENERAL[4]->name ?>"
                                    size="12"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_GENERAL[4]->name]; ?>" />
                            </td>
                            <td style="background-color: #f6f6f6">
                                <?php echo JText::_($CONFIG_PARAMS_GENERAL[4]->info); ?>
                            </td>
                        </tr>
                    </table>
                    <?php
                    echo $pane->endPanel();
                    echo $pane->startPanel( JText::_('TAB_PAYMENTS'), 'tabPayment' );
                    ?>
                    <table class="admintable">
                        <?php
                        $i = 0;
                        for($i = 0; $i < count($CONFIG_PARAMS_PAY); $i++){?>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_PAY[$i]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_PAY[$i]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_PAY[$i]->text); ?>
                                </span>
                            </td>
                            <td>
                                <input
                                    class="inputbox"
                                    type="text"
                                    name="<?php echo $CONFIG_PARAMS_PAY[$i]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_PAY[$i]->name ?>"
                                    size="25"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_PAY[$i]->name]; ?>" />
                            </td>
                            <td style="background-color: #f6f6f6">
                                    <?php echo JText::_($CONFIG_PARAMS_PAY[$i]->info); ?>
                            </td>
                        </tr>
                        <?php
                        }
                        ?>
                    </table>
                    <?php
                    echo $pane->endPanel();
                    echo $pane->startPanel( JText::_('TAB_FEATURES'), 'tabFeatures' );
                    ?>
                    <table class="admintable">
                        <?php
                        $i = 0;
                        for($i = 0; $i < count($CONFIG_PARAMS_FEATURES); $i++){?>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_FEATURES[$i]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_FEATURES[$i]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_FEATURES[$i]->text); ?>
                                </span>
                            </td>
                            <td>
                                <select
                                    class="inputbox"
                                    name="<?php echo $CONFIG_PARAMS_FEATURES[$i]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_FEATURES[$i]->name ?>"
                                    size="1">
                                    <option value="0" <?php echo ($this->acr_config[$CONFIG_PARAMS_FEATURES[$i]->name] == '0')?'selected':''; ?>><?php echo JText::_('LABEL_DISABLE'); ?></option>
                                    <option value="1" <?php echo ($this->acr_config[$CONFIG_PARAMS_FEATURES[$i]->name] == '1')?'selected':''; ?>><?php echo JText::_('LABEL_ENABLE'); ?></option>
                                </select>
                            </td>
                            <td style="background-color: #f6f6f6">
                                <?php echo JText::_($CONFIG_PARAMS_FEATURES[$i]->info); ?>
                            </td>
                        </tr>
                        <?php
                        }
                        ?>
                    </table>
                    <?php
                    echo $pane->endPanel();
                    echo $pane->startPanel( JText::_('TAB_EMAIL'), 'tabEmail' );
                    ?>
                    <table class="admintable">
                        <?php
                        $i = 0;
                        for($i = 0; $i < count($CONFIG_PARAMS_EMAIL)-2; $i++){?>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_EMAIL[$i]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_EMAIL[$i]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_EMAIL[$i]->text); ?>
                                </span>
                            </td>
                            <td>
                                <input
                                    class="inputbox"
                                    type="text"
                                    name="<?php echo $CONFIG_PARAMS_EMAIL[$i]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_EMAIL[$i]->name ?>"
                                    value="<?php echo $this->acr_config[$CONFIG_PARAMS_EMAIL[$i]->name]; ?>"
                                    style="width: 370px;"/>
                            </td>
                            <td style="background-color: #f6f6f6">
                                <?php echo JText::_($CONFIG_PARAMS_EMAIL[$i]->info); ?>
                            </td>
                        </tr>
                        <?php
                        }
                        for($i = count($CONFIG_PARAMS_EMAIL)-2; $i < count($CONFIG_PARAMS_EMAIL); $i++){?>
                        <tr>
                            <td class="key">
                                <span class="editlinktip hasTip" title="<?php echo JText::_( $CONFIG_PARAMS_EMAIL[$i]->text ); ?>::<?php echo JText::_($CONFIG_PARAMS_EMAIL[$i]->desc); ?>">
                                    <?php echo JText::_($CONFIG_PARAMS_EMAIL[$i]->text); ?>
                                </span>
                            </td>
                            <td>
                                <textarea
                                    class="inputbox"
                                    name="<?php echo $CONFIG_PARAMS_EMAIL[$i]->name ?>"
                                    id="<?php echo $CONFIG_PARAMS_EMAIL[$i]->name ?>"
                                    cols="50"
                                    rows="10"><?php echo trim($this->acr_config[$CONFIG_PARAMS_EMAIL[$i]->name]); ?></textarea>
                            </td>
                            <td style="background-color: #f6f6f6">
                                <?php echo JText::_($CONFIG_PARAMS_EMAIL[$i]->info); ?>
                            </td>
                        </tr>
                        <?php
                        }
                        ?>
                    </table>
                    <?php
                    echo $pane->endPanel();
                echo $pane->endPane();
                ?>
            </td>
            <td width="25%" valign="top">
                <fieldset class="adminform">
                <legend><?php echo JText::_( 'ACR' ); ?></legend>
                    <div style="float: left;"><img src="components/com_articlecashrewards/assets/images/icon-48-acr-48.png"></div>
                    <div style="padding-top:8px;text-indent:20px;"><h2><?php echo JText::_('ACR_VERSION'); ?></h2></div>
                </fieldset>
            </td>
        </tr>
    </tbody>
</table>
</div>
<input type="hidden" name="option" value="com_articlecashrewards" />
<input type="hidden" name="task" value="save" />
<input type="hidden" name="controller" value="config" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>